@include('public.page_styles')
  <link rel="stylesheet" href="{{ asset("/AdminLTE/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css") }}">

</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
  @include('public.top')
  <!-- Left side column. contains the logo and sidebar -->
  @include('public.sidebar')
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper" id="w_container" >
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
          {{ trans('message.complaint_suggest') }}
        <small>{{ trans('message.list') }}</small>
      </h1>
      <ol class="breadcrumb">
        <li><a ><i class="fa fa-dashboard"></i> {{ trans('message.home') }}</a></li>
        <li><a >{{ trans('message.serviceManage') }}</a></li>
        <li class="active">{{ trans('message.complaint_suggest') }}</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
      <div class="row">
        <div class="col-xs-12">
          <div class="box">
              <div class="box-header">
                  <div class="pull-right">
                      <div class="form-inline pull-right">
                          <span>
                            <a class="btn btn-sm btn-primary grid-refresh" onclick="refresh()"><i class="fa fa-refresh"></i> {{ trans('message.refresh') }}</a>
                          </span>
                      </div>
                  </div>
                  {{--<form class="form_search" action="{{ url('suggest/list') }}" method="GET" style="margin-bottom:10px">
                      <div style="float:left;margin-right:5px">
                          <input type="text" name="phoneSearch"  class="form-control input" placeholder="请输入手机号" value="{{ $phoneS }}">
                      </div>
                      <div class="btn-group" >
                          <button type="submit" class="btn btn-primary">{{ trans('message.search') }}</button>
                      </div>
                      <div style="clear:both;"></div>
                  </form>--}}
              </div>
            <!-- /.box-header -->
            <div class="box-body">
              <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                    <th style="width: 2%;">id</th>
                    <th style="width: 8%;">手机号</th>
                    <th style="width: 22%;">投诉原因</th>
                    <th >详细描述</th>
                    <th style="width: 10%;">时间</th>
                </tr>
                </thead>
                <tbody>
                @if($suggestList)
                    @foreach($suggestList as $suggest)
                        <tr>
                            <td>{{ $suggest->id }}</td>
                            <td>{{ $suggest->phone }}</td>
                            <td>
                                @if($suggest->check_text)
                                    @foreach($suggest->check_text as $value)
                                        {{ state_config('suggest',$value) }}　&nbsp;
                                    @endforeach
                                @endif
                            <td>{{ $suggest->desc_text }}</td>
                            <td>{{ $suggest->create_date }}</td>
                        </tr>
                    @endforeach
                @endif
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
  <!-- /.content-wrapper -->
  @include('public.bottom')

  <!-- Control Sidebar -->
  {{--@include('public.aside')--}}
  <!-- /.control-sidebar -->
  <!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->
  <div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->
@include('public.javascript')
<script src="{{ asset ("/AdminLTE/bower_components/datatables.net/js/jquery.dataTables.min.js") }}" type="text/javascript"></script>
<script src="{{ asset ("/AdminLTE/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js") }}" type="text/javascript"></script>
<script src="{{ asset ("/AdminLTE/bower_components/jquery-slimscroll/jquery.slimscroll.min.js") }}" type="text/javascript"></script>
{{--<script src="{{ asset ("/AdminLTE/bower_components/fastclick/lib/fastclick.js") }}" type="text/javascript"></script>--}}
<script src="{{ asset ("/js/bootbox.js") }}" type="text/javascript"></script>

<!-- page script -->
<script>
  $(function(){
      $('#example1').DataTable({
          "language": {
              "url":"{{ asset ("/AdminLTE/bower_components/datatables.net/chinese.json") }}"
          },
          "aaSorting": [[ 0, "desc" ]],//默认第几个排序
          "bStateSave": true,//状态保存
          "aoColumnDefs": [
              //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
              {"orderable":false,"aTargets":[1,2,3,4]}// 制定列不参与排序
          ]
      });


      $('.table-sort tbody').on( 'click', 'tr', function () {
          if ( $(this).hasClass('selected') ) {
              $(this).removeClass('selected');
          }
          else {
              table.$('tr.selected').removeClass('selected');
              $(this).addClass('selected');
          }
      });


      @if(session()->has('success'))
           alertMess("{{session()->get('success')}}");
      @endif


  });

</script>
</body>
</html>
